﻿@model OneWeb.ViewModels.ArticleDetailViewModel

@{
    ViewBag.Title = Model.CurrentArticle.Title;
}

<h2><b>@Model.CurrentArticle.Title</b></h2>
<span>文 / @Model.CurrentArticle.Author.Name</span>
<div>
    <hr />

    <div class="essay-content">
        @MvcHtmlString.Create(Model.CurrentArticle.Content)
    </div>

    <p class="text-editor">@Html.DisplayFor(model => model.CurrentArticle.AuthorIntroduce)</p>
</div>

<hr />
<p>作者</p>

<table>
    <tr>
        <td>
            <a href="@Url.Action("details", "author",new { Id = Model.CurrentArticle.AuthorId})" target="_blank">
                <img class="essay-detail avatar" src="@Model.CurrentArticle.Author.WebUrl" />
            </a>
        </td>
        <td>
        <td>
            <div>
                @Model.CurrentArticle.Author.Name @Model.CurrentArticle.Author.WbName
            </div>
            <div class="author-introduce">@Model.CurrentArticle.AuthIt</div>
        </td>
</table>

<!--上一篇&下一篇-->
<div class="one-pager">
    @if (Model.PreviousArticle != null)
    {
        <a href="@Url.Action("details", "article", new { Id = Model.PreviousArticle.Id })" class="previous">上一篇： @Model.PreviousArticle.Title</a>
    }
    else
    {
        <a class="previous">上一篇：无</a>
    }

    @if (Model.NextArticle != null)
    {
        <a href="@Url.Action("details", "article", new { Id = Model.NextArticle.Id })" class="next">下一篇：@Model.NextArticle.Title</a>
    }
    else
    {
        <a class="next disabled">下一篇：无</a>
    }
</div>